<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php echo @$title; ?></title>
    
    <meta content="作业本教材,作业本二手书教材,二手教材,大学二手,大学教材,旧书,二手图书,教材,jiaoc8,zuoyeben" name="Keywords">
	<meta name="description" content="作业本-大学二手书商城(www.zyben.net)是南林第一个网上二手书商城，为大学生提供二手教材、二手书在线购买服务。提供免费配送服务、7天内无条件包换服务。还可以发布求购信息，作业本确保每一位同学都可以获得最好的购买二手书体验。在线发布个人二手物品信息，交换购买二手物品。" />


    <!-- Bootstrap -->
    <link href="<?php echo base_url("plug/bootstrap/css/bootstrap.min.css");?>" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <link href="<?php echo base_url("static/css/header.css");?>" rel="stylesheet">
    <?php if(isset($style)){?>
	    <?php if(is_array($style)){?>
	    	<?php foreach ($style as $top_style){?>
	    	<link href="<?php echo base_url("static/css/".$top_style);?>.css" rel="stylesheet">
	    	<?php }?>
	    <?php }else{?>
	    	<link href="<?php echo base_url("static/css/".$style);?>.css" rel="stylesheet">
	    	
	    <?php }?>
    <?php }?>

    <script src="<?php echo base_url("static/javascript/jquery.min.js");?>"></script>
    <script src="<?php echo base_url("plug/bootstrap/js/bootstrap.min.js");?>"></script>
    
    <link href="<?php echo base_url("plug/jbox/jBox.css");?>" rel="stylesheet">
    <script src="<?php echo base_url("plug/jbox/jBox.min.js");?>"></script>
	<link rel="shortcut icon" href="<?php echo base_url("static/images/favicon.ico"); ?>" type="image/x-icon" /> 

  </head>
<body>


<div class="topbar">
	
	<div class="header clearfix">
		
		<div class="logo">
			<a href="<?php echo base_url();?>" title="作业本二手书商城">
				<img src="<?php echo base_url();?>static/images/logo.png" width="" height="" alt="作业本二手书商城logo" />
			</a>
		</div><!-- logo -->
		
		<div class="search">
			
			<input type="text" name="topSearch" id="topSearch" value="<?php echo $this->input->get("r");?>" class="form-control" placeholder="搜索二手书、文具名称" />
			<input type="button" id="topSearchBtn" value="搜 索" />
		</div>
		
		

	</div>

</div><!-- topbar -->

<div class="navbar">
	
	<li>
		<a href="<?php echo base_url("/");?>">
		<i><img src="<?php echo base_url("static/images/indexeq.png"); ?>" width="36" /></i>
		<span>首页</span>
		</a>
	</li>
	<li>
		<a href="<?php echo base_url("lists/category"); ?>">
		<i><img src="<?php echo base_url("static/images/class.png"); ?>" width="36" /></i>
		<span>分类</span>
		</a>
	</li>
	<li>
		<a href="<?php echo base_url("shopcar"); ?>">
		<i><img src="<?php echo base_url("static/images/shopcar.png"); ?>" width="36" /></i>
		<span>购物车</span>
		</a>
	</li>
</div>

<input type="hidden" id="baseUrl" value="<?php echo base_url();?>" >
<script>
/**
 * 错误信息
 */
function alertError(message){
	
	$(".jBox-Notice").hide();
	
	var model = new jBox('Notice', {
	    content: message,
	    position:{x:'center',y:'center'},
	    color:"red"
	});
}

/**
 * 成功信息
 */
function alertSuccess(message){
$(".jBox-Notice").hide();
	new jBox('Notice', {
	    content: message,
	    position:{x:'center',y:'center'},
	    color:"green"
	});
}

$("#topSearchBtn").click(function(){
	
	if($("#topSearch").val().replace(/(^\s*)|(\s*$)/g,"") != ''){
		location.href=$("#baseUrl").val()+"search?r="+encodeURI($("#topSearch").val());
	}
});

$(document).ready(function(e) {
	$(this).keydown(function (e){
		if(e.which == "13"){
			var focusActId = document.activeElement.id;
			if(focusActId == 'topSearch'){
				$("#topSearchBtn").click();
			}
	  	}
	})
});

</script>